
<ion-view view-title="我的挑战" xmlns="http://www.w3.org/1999/html">
    <ion-content>

        <ion-refresher pulling-text="刷新" on-refresh="moreBattle()">
        </ion-refresher>

        <div class="button-bar email-bar">
            <a class="button button-royal in" href="#/tab/mybattles/inbox">收件箱</a>
            <a class="button button-royal new" href="#/tab/mybattles/newletter">发挑战信</a>
            <a class="button button-royal send" href="#/tab/mybattles/outbox">发件箱</a>
        </div>
        <div class="list card battle-item" ng-repeat="battle in battles">
            <div class="item item-divider" ng-click="joinStore(battle.store._id)">
                <span ng-bind="battle.store.text"></span>
            </div>
            <div class="item item-body">

                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">创建人:</span>
                    <span ng-bind="battle.owner.name"></span>
                    <span class="input-label text-right" style="width: 80px;">状态:</span>
                    <span ng-bind="battle.status | zhuangtai"></span>
                </label>
                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">成绩:</span>
                    <span ng-bind="battle.myScore | fen"></span>
                    <span class="input-label text-right" style="width: 80px;">时间:</span>
                    <span ng-bind="battle.createTime | shijian"></span>
                </label>
                <!--
                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">状态:</span>
                    <span ng-bind="getStatusName(battle.status)"></span>
                </label>
                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">成绩:</span>
                    <span ng-bind="battle.myScore"></span>
                </label>
                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">时间:</span>
                    <span ng-bind="battle.createTime"></span>
                </label>
                -->
                <label class="item item-input">
                    <span class="input-label text-right" style="width: 80px;">参赛人员:</span>
                    <span style="margin-right: 6px;" ng-repeat="user in battle.users" ng-bind="user.name"></span>
                </label>
            </div>
        </div>
        <!--
        <div class="text-center" style="margin-top:15px;">
            <a ng-show="showBattleMore" ng-click="moreBattle()">更多</a>
        </div>
        -->
    </ion-content>
</ion-view>
